/**
 * Created by hps on 17-4-27.
 */
public class ClassDataApp {
    public static void main(String[] args) {
        int maxSize = 100;
        ClassDataArray arr = new ClassDataArray(maxSize);

        arr.insert(new Person("Ecans", "Patty", 24));
        arr.insert(new Person("Smith","Lorraine", 37));
        arr.insert(new Person("Yee","Tom", 43));
        arr.insert(new Person("Adams","Henry", 63));
        arr.insert(new Person("Hashimoto","Sato", 21));
        arr.insert(new Person("Stimson","Henry", 29));
        arr.insert(new Person("Velasquez","Jose", 72));
        arr.insert(new Person("Lamarque","Henry", 54));
        arr.insert(new Person("Vang","Minh", 22));
        arr.insert(new Person("Creswell","Lucinda", 18));

        arr.displayAll();

        String searchKey = "Stimson";

        Person found;
        found = arr.find(searchKey);
        if(found != null) {
            System.out.print("Found ");
            found.displayPerson();
        } else {
            System.out.println("Can't found " + searchKey);
        }

        System.out.println("Deleting Smith, Yee, and Creswell");

        arr.delete("Smith");
        arr.delete("Yee");
        arr.delete("Creswell");

        arr.displayAll();
    }
}
